<template>
    <div class="table_page" page-item-sty="page">
        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" prev-text="上一页"
            next-text="下一页" :current-page="currentPage4" :pager-count="9" :page-sizes="[10, 20, 30, 40, 50]"
            :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="pageNum">
        </el-pagination>
    </div>
</template>
<script>
export default {
    props: {
        pageNum: {
            type: Number,
            default: 1
        },
        currentPage4: {
            type: Number,
            default: 1
        }
    },
    data() {
        return {
        }
    },
    methods: {
        handleSizeChange(val) {
            this.$emit('handleSizeChange', val)
        },
        handleCurrentChange(val) {
            // 将改变的数值传递给父组件
            this.$emit('select', val)
        }
    },
    mounted() {
        // console.log(this.currentPage4)
    }
}
</script>
<style lang="scss">
[page-item-sty="page"] {
    .el-pager li {
        font-weight: 400;
        min-width: 28px;
        height: 28px;
        border: 1px solid;
        border-left: 0;
    }

    .el-pager li:first-child {
        border-left: 1px solid;
    }
}
</style>
<style scoped lang="scss">
.table_page {
    padding-top: 20px;
    float: right;
}
</style>